<%@ page import="org.icress.fusion.moc.Tb" %>
<%@ page import="org.icress.fusion.moc.Tc" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'moc.tc.label', default: 'Tc')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
        <g:javascript library="prototype" />
    </head>
    <body>
        <div class="body">
            <h1><g:message code="default.show.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            	<div class="message">${flash.message}</div>
            </g:if>
	        <div class="dialog">
	        	<g:set var="tbInstance" value="${org.icress.fusion.moc.Tb.get(tcInstance?.tb?.id)}" scope="page" />
	            <g:render template="/moc/tb/showTemplate" model="[tbInstance:tbInstance]" />
	        </div>
            <br/>
            <div class="dialog">
				<g:render template="/moc/tc/showTemplate" />
            </div>
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${tcInstance?.id}" />
                    <span class="button"><g:actionSubmit class="edit" action="edit" value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
                    <span class="button">
                        <g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" 
                            onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
                    </span>
	            </g:form>
            </div>
            <br/>
            <div class="list">
				<g:include controller="tc" action="related_tgs" params="[id:tcInstance?.id]"/>
            </div>                      
        </div>
    </body>
</html>
